#include "cdishtype.h"
#include "cconstdefinition.h"

CDishType::CDishType(QObject *parent) :
    CObject(parent) {
//    m_id = KInvalidId;
    m_description = KNullString;
    m_name = KNullString;
    m_picture = KNullString;
    m_parent_id = KInvalidId;
}

//int CDishType::id() {
//    return m_id;
//}

//void CDishType::setId(int id) {
//    if (m_id != id) {
//        m_id = id;
//        emit idChanged();
//    }
//}

QString CDishType::name() {
    return m_name;
}

void CDishType::setName(QString name) {
    if (m_name != name) {
        m_name = name;
        emit nameChanged();
    }
}

int CDishType::parentId() {
    return m_parent_id;
}

void CDishType::setParentId(int parentId) {
    if (m_parent_id != parentId) {
        m_parent_id = parentId;
        emit parentIdChanged();
    }
}

QString CDishType::description() {
    return m_description;
}

void CDishType::setDescription(QString desc) {
    if (m_description != m_description) {
        m_description = desc;
        emit descriptionChanged();
    }
}

QString CDishType::picture() {
    return m_picture;
}

void CDishType::setPicture(QString picture) {
    if (m_picture != picture) {
        m_picture = picture;
        emit pictureChanged();
    }
}
